home *** CD-ROM | disk | FTP | other *** search
- // Server
-
- function connect(id)
- {
- queue.pop("ServerConnect.emule?id="+id);
- }
-
- function showserver()
- {
- stopAllUpdates();
- hideAllViews();
- currentView="ServerView";
- content.ServerView.style.visibility="visible";
- content.resize();
- content.servlist.showIt();
- content.servinfo.showIt();
- content.servlog.showIt();
- updateServlist();
- updateServerMsg();
- updateServerLog();
- setTimeout("reshowserver();",250)
- }
-
- function reshowserver()
- {
- hideAllViews();
- content.ServerView.style.visibility="visible";
- content.resize();
- content.servlist.showIt();
- content.servinfo.showIt();
- content.servlog.showIt();
- }
-
- function updateServlist()
- {
- queue.pop("ServerListUpdate.emule");
- }
-
- function updateServerlistRowSize(id,size)
- {
- queue.pop("ServerListUpdateRowWidth.emule?id="+id+";size="+size);
- }
-
- function ServerlistDblclick(id)
- {
- connect(id);
- }
-
- function deleteServer(id)
- {
- queue.pop("ServerDelete.emule?id="+id);
- }
-
- function setPrioOfServer(id,prio)
- {
- queue.pop("ServerPriority.emule?id="+id+";prio="+prio);
- }
-
- function updateServerMsg()
- {
- queue.pop("ServerInfoUpdate.emule");
- }
-
- function updateServerLog(startline)
- {
- queue.pop("ServerLogUpdate.emule?startline="+startline);
- }
-
- function addServer(ip, port, name)
- {
- queue.pop("ServerNew.emule?ip="+ip+";port="+port+";name="+name);
- }
-
- function refreshServer(servermet)
- {
- queue.pop("ServerMetRefresh.emule?servermet="+servermet);
- setTimeout("updateServlist();",20000);
- }
-
- function setServerStatic(id, stat)
- {
- queue.pop("ServerStatic.emule?id="+id+";static="+stat);
- }
-
-
- // Transfer
-
- function showtransfer()
- {
- stopAllUpdates();
- hideAllViews();
- currentView="TransferView";
- content.resize();
- content.TransferView.style.visibility="visible";
- content.translist.showIt();
- content.uplist.showIt();
- updateDownlist();
- updateUplist();
- updateProgressbar();
- }
-
- function setFilePrio(id,prio)
- {
- queue.pop("TransferPriority.emule?id="+id+";prio="+prio);
- }
-
- function setFileStatus(id,status)
- {
- queue.pop("TransferStatus.emule?id="+id+";status="+status);
- }
-
- function setCreateEd2kLink(id,html)
- {
- queue.pop("TransferCreateEd2kLink.emule?id="+id+";html="+html);
- }
-
- function clearComplete()
- {
- queue.pop("TransferClearCompleted.emule");
- }
-
- function updateDownlist()
- {
- queue.pop("TransferDownListUpdate.emule");
- }
-
- function updateDownloadlistRowSize(id,size)
- {
- queue.pop("TransferDownListUpdateRowWidth.emule?id="+id+";size="+size);
- }
-
- function updateUplist()
- {
- queue.pop("TransferUpListUpdate.emule");
- }
-
- function updateUploadlistRowSize(id,size)
- {
- queue.pop("TransferUpListUpdateRowWidth.emule?id="+id+";size="+size);
- }
-
- function updateProgressbar()
- {
- queue.pop("TransferRenderProgressBar.emule?id=0");
- }
-
- function fakeCheck(no,id)
- {
- queue.pop("TransferFakecheck.emule?id="+id+";no="+no);
- }
-
- function loadSources(id)
- {
- queue.pop("TransferLoadSources.emule?id="+id);
- }
-
- function saveSources(id)
- {
- queue.pop("TransferSaveSources.emule?id="+id);
- }
-
- function dropSources(id)
- {
- queue.pop("TransferDropSources.emule?id="+id);
- }
-
-
- // Search
-
- function showsearch()
- {
- stopAllUpdates();
- hideAllViews();
- currentView="SearchView";
- content.resize();
- content.SearchView.style.visibility="visible";
- content.slist.showIt();
- }
-
- function enterED2KLink(link)
- {
- queue.pop("SearchEnterED2KLink.emule?ed2k="+link);
- }
-
- function startWebSearch(name, type)
- {
- var adr=encodeURI("http://www.filedonkey.com/fdsearch/index.php?media="+type+"&pattern="+name);
- window.open(adr,"_blank");
- content.in_webname.value="";
- }
-
- function startSearch(name, global, min, max, type)
- {
- queue.pop("SearchStart.emule?name="+name+";global="+global+";min="+min+";max="+max+";type="+type);
- }
-
- function updateSearchlistRowSize(id,size)
- {
- queue.pop("SearchListUpdateRowWidth.emule?id="+id+";size="+size);
- }
-
- // Shared View
-
- function showshared()
- {
- alert("Not implemneted yet");
- }
-
- // Messages View
-
- function showmessages()
- {
- alert("Not implemneted yet");
- }
-
- // IRC View
-
- function showirc()
- {
- alert("Not implemneted yet");
- }
-
- // Statistics View
-
- function showstatistics()
- {
- alert("Not implemneted yet");
- }
-
- // Preferences View
-
- function showpreferences()
- {
- window.open("preferences.emule","preferences","dependent=yes,width=800,height=600,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no");
- }
-
- // All Views
-
- function toggleHeadline(tabcol,value)
- {
- queue.pop("toggleHeadline.emule?tabcol="+tabcol+";value="+value);
- }
-
- function hideAllViews()
- {
- content.ServerView.style.visibility="hidden";
- content.servlist.hideIt();
- content.servinfo.hideIt();
- content.servlog.hideIt();
- content.TransferView.style.visibility="hidden";
- content.translist.hideIt();
- content.uplist.hideIt();
- content.SearchView.style.visibility="hidden";
- content.slist.hideIt();
- }
-
- timerServerInfo=false;
- timerServerLog=false;
- timerDownloadList=false;
- timerUploadList=false;
- timerImageRender=false;
- currentView="";
-
- function stopAllUpdates()
- {
- if(timerServerInfo)
- window.clearTimeout(timerServerInfo);
- if(timerServerLog)
- window.clearTimeout(timerServerLog);
- if(timerDownloadList)
- window.clearTimeout(timerDownloadList);
- if(timerUploadList)
- window.clearTimeout(timerUploadList);
- if(timerImageRender)
- window.clearTimeout(timerImageRender);
- }